<template>
  <el-table stripe border :data="rightsList" style="width: 100%">
    <el-table-column type="index" label="#"></el-table-column>
    <el-table-column
      prop="authName"
      label="权限名称"
      width="180"
    ></el-table-column>
    <el-table-column prop="path" label="路径" width="180"></el-table-column>
    <el-table-column label="权限等级" width="180">
      <template slot-scope="scope">
        <el-tag v-if="scope.row.level === '0'">等级一</el-tag>
        <el-tag type="success" v-else-if="scope.row.level === '1'">
          等级二
        </el-tag>
        <el-tag type="warning" v-else>等级三</el-tag>
      </template>
    </el-table-column>
  </el-table>
</template>

<script>
export default {
  name: 'RightsTable',
  props: {
    rightsList: {
      type: Array,
      default() {
        return []
      },
    },
  },
}
</script>

<style>
</style>